package org.abettor.jroa;

import java.io.Serializable;

/**
 * <p>This interface describes a special object, which can be serialized and
 * delivered from one node to another.</p>
 * <p>Here, <i>node</i> can be ether a computer, a network, an application,
 * or just a thread.</p>
 * 
 * @author <a href="http://www.abettor.org/" target="_blank">abettor</a>
 *
 */
public interface Accessible extends Serializable
{
	/**
	 * When this function is called, everything (excluding static functions)
	 * of the object should immediately stop and nothing should changes anymore.
	 * After that, the object will be serialized.
	 */
	public void freeze();

	/**
	 * If the object is frozen, one can call this function to restore its
	 * previous status. 
	 */
	public void thaw();

	/**
	 * Check if the object is frozen now.
	 */
	public boolean isFrozen();
}
